// 首页
import axios from '@/api/request/request'

// 保存
const userSave = (option: any) => {
  return axios.post('/user/save', option)
}

// 登录
const login = (option: any) => {
  return axios.post('/user/login', option)
}

// 注册
const register = (option: any) => {
  return axios.post('/user/register', option)
}

// 登出
const logout = (option: any) => {
  return axios.post('/user/logout', option)
}

// 忘记密码
const forgot = (option: any) => {
  return axios.post('/user/forgot', option)
}

// 获取用户信息
const userGetUser = (option: any) => {
  return axios.get('/user/getUser', option)
}

//获取验证码
const getCaptchaImage = (option: any) => {
  return axios.get('/captcha/image', option)
}

export { userSave, login, register, logout, forgot, userGetUser, getCaptchaImage }
